< previous page page_67 next page >

Page 67
of the data in the table. If you need to filter the table (usually because it is a large table), you need to create a Dynaset or Snapshot that contains a subset of the data in the table.
Table objects can't use Bookmarks, so you can't mark your place in a table, move around, and then return to the location using Visual Basic Bookmarks. You can, however, save the table index value instead. The table must have an index declared, and you must know the fields used in the declared index. You can get this information from the Design form of Data Manager, or you can get it at runtime by reading the Index.Name and Index.Fields properties of the Table object. Refer to the section on the Database data object for an example of how to read the Index.Name and Index.Fields properties of a data table.
ODBC Data Source Limitations
If you plan to do any work with ODBC data sources, you have to forget using the Visual Basic Table object. It does not matter whether the ODBC source is a SQL Server data source or a spreadsheet on your local workstation. You cannot define a Table object to access the data. You must use a Dynaset or Snapshot object for ODBC data requests.
The reason for this limitation is that the ODBC driver gives Visual Basic access to virtually any type of data. There is no requirement that the data source comply with the Visual Basic data engine data table format. Because the Table object is designed specifically to provide direct access to Visual Basic data tables, it can only be used to access a data table that exists as data table in a Microsoft Access database.
When to Use the Table-Type Recordset Data Object
The Visual Basic Table-type Recordset object is the best choice when you need to provide speedy searches of large data tables. As long as you do not need to access ODBC data sources, and you do not need to get a set of data for processing, the Table object is an excellent choice.
If, however, you need to process sets of data instead of single records, the Table object does not work as easily or as quickly as a Dynaset or Snapshot object.
The Snapshot-Type Recordset Data Object
Visual Basic Snapshot-type Recordset objects are almost identical to Dynaset-type Recordsets in behavior and properties. However, there are two major differences between Snapshot objects and Dynaset objects. These two differences are the most important aspects of Snapshots.
· Snapshots are stored entirely in workstation memory.
· Snapshots are read-only and nonupdatable objects.

 
< previous page page_67 next page >

If you like this book, buy it!